package cn.dxh.stagefinal.dao;

import cn.dxh.stagefinal.bean.CommBrand;
import cn.dxh.stagefinal.bean.CommType;
import cn.dxh.stagefinal.bean.Commodity;
import cn.dxh.stagefinal.bean.SalesChannel;

import java.util.List;
import java.util.Map;

/**
 * 2019/12/9 22:12
 *
 * @author Wenhao Lee
 * 心向远方，不负厚望。
 */
public interface CommodityDao {
    List<Commodity> findCommodity(Map<String, Object> map);

    Commodity findCommById(Integer id);

    int updateComm(Commodity commodity);

    List<SalesChannel> findAllChannel();

    List<Commodity> findByIds(List<Integer> ids);

    List<SalesChannel> findSalesChannel(String channelName);

    int removeChannelByCommId(Integer commId);

    int addChannelByCommId(Map<String, Object> map);

    int addChannel(SalesChannel channel);

    int addComm(Commodity commodity);

    List<CommType> findAllType();

    List<CommBrand> findAllBrand();

    CommType findTypeByName(String tName);

    CommBrand findBrandByName(String bName);

    int addCommType(CommType commType);

    int addCommBrand(CommBrand commBrand);

}
